import request from '@/utils/request'

const api_name = '/product/attr'

export default {

  fetchList(params) {
      return request({
        url: `${api_name}/page`,
          method:'get',
          params:params
      })
  },
  
  getDataList(params) {
    return request({
      url: `${api_name}/list`,
      method:'get',
      params: params
    })
  },

    deleteAttr(data) {
        return request({
          url:'/product/attr/delete',
          method: 'post',
          data: data
        })
    },
    
    getAttr(params) {
        return request({
            url: `${api_name}/info`,
            method: 'get',
            params: params
        })
    },
      
    createAttr(data) {
        return request({
          url: `${api_name}/create`,
          method: 'post',
          data: data
        })
    },
      
    updateAttr(data) {
        return request({
          url:'/product/attr/update',
          method: 'post',
          data: data
        })
    }
}

